package com.amos.muexamclient.sys.service.dto;


import com.alibaba.fastjson.JSONObject;
import com.amos.core.PageDTO;
import com.amos.muexamclient.sys.entity.SysLogininforEntity;
import com.amos.muexamcore.core.MuEntity;
import com.amos.muexamcore.core.MuField;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * Copyright © 2018 五月工作室. All rights reserved.
 *
 * @Package com.amos.muexamclient.service.dto
 * @ClassName SysLogininforDTO
 * @Description TODO
 * @Author Amos
 * @Modifier
 * @Date 2020-03-24 14:35:13
 * @Version 1.0
 **/
@MuEntity(table = "sys_logininfor", entity = SysLogininforEntity.class)
@Data
public class SysLogininforDTO extends PageDTO implements Serializable {

    private static final long serialVersionUID = 98842838674128674L;
    @MuField(remark = "用户ID", type = "varchar", length = 32, column = "user_id")
    private String userId;

    @MuField(remark = "用户账号", type = "varchar", length = 50, column = "user_name")
    private String userName;

    @MuField(remark = "登录IP地址", type = "varchar", length = 50, column = "ipaddr")
    private String ipaddr;

    @MuField(remark = "登录地点", type = "varchar", length = 255, column = "login_location")
    private String loginLocation;

    @MuField(remark = "浏览器类型", type = "varchar", length = 50, column = "browser")
    private String browser;

    @MuField(remark = "操作系统", type = "varchar", length = 50, column = "os")
    private String os;

    @MuField(remark = "登录状态（0成功 1失败）", type = "char", length = 1, column = "status")
    private String status;

    @MuField(remark = "提示消息", type = "varchar", length = 255, column = "msg")
    private String msg;

    @MuField(remark = "访问时间", type = "datetime", column = "login_time")
    private Date loginTime;

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
